package com.example.administrator.testz.Adapter;/**
 * Created by Administrator on 2016/3/16.
 */

import android.content.Context;
import android.widget.TextView;

import com.example.administrator.testz.News.NewsBean;
import com.example.administrator.testz.R;

import java.util.List;

/**
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>类描述
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>属性描述
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>方法描述
 */
public class TestAdapter extends RealizeAdapter<NewsBean>{

    public TestAdapter(List<NewsBean> mDatas, Context mContext, int layoutId) {
        super(mDatas, mContext, layoutId);
    }

    @Override
    public void setConvert(int position, ViewHolder holder) {
        NewsBean bean = mDatas.get(position);
//        ((TextView)holder.getView(R.id.titleView)).setText(bean.getmTitle());
        holder.setText(R.id.titleView, bean.getmTitle());
        ((TextView)holder.getView(R.id.contentView)).setText(bean.getmContent());
    }
}
